<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head><title>
    在线读书 - 爱读书
</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui-v2.5.7/css/layui.css"/>
    <script src="https://www.layuicdn.com/layui-v2.5.7/layui.js"></script>
    <script lang="javascript" type="text/javascript" th:src="@{https://libs.baidu.com/jquery/1.11.3/jquery.min.js}"></script>
    <link rel="stylesheet" th:href="@{/css/core.min-20160809.css}">
    <link rel="stylesheet" th:href="@{/css/dushu.min-20160802.css}">
    <link rel="stylesheet" th:href="@{/css/font_1468833227_139596.css}">
    <script>
        /*判断是否要显示登陆注册*/
        $(function () {
            if ($('.float-right').find("a:eq(0)").text() == '欢迎回来') {
                $(".float-right").find("a:eq(0)").attr("href", "javascript:;");
                $(".float-right").find("a:eq(1)").attr("href", "javascript:;");
            }
        })
    </script>
</head>
<body>
<!--实现登录注册-->
<div class="layout bg border-bottom">
    <div class="container height-big text-gray">
        <span class="float-right">
            <a th:href="@{/index/toLogin}" th:text="${session.user}==null?'注册':'欢迎回来'" class="text-gray"></a>
            <span class="text-little">|</span>
            <a  th:href="@{/index/toLogin}" class="text-gray" th:text="${session.user}==null?'登陆':${session.user.phone}"></a>
        </span>读书好，好读书，读好书！
    </div>
</div>


<!--可下拉式导航栏-->
<div class="layout bg border-bottom fixed-top hidden" style="z-index: 99;" id="fixednav">
    <div class="container"><div class="row">
        <div class="span4">
            <a href="javascript:;" title="读书网">
            <img th:src="@{/picture/login1.png}" alt="爱读书"></a></div>
        <div class="span13">
            <ul class="nav nav-inline nav-menu padding-top">
                <li><a href="/index/toRead" >每日一读</a></li>
                <li><a th:href="@{/index/toNovel/1}" >小说作品</a></li>
                <li><a th:href="@{/index/toNovel/2}" >经济管理</a></li>
                <li><a th:href="@{/index/toNovel/3}">历史传记</a></li>
                <li><a th:href="@{/index/toNovel/4}">生活时尚</a></li>
                <li><a th:href="@{/index/toNovel/5}" >文学艺术</a></li>
                <li><a th:href="@{/index/toNovel/6}" >社会科学</a></li>
                <li><a th:href="@{/index/toNovel/7}" >成功励志</a></li>
            </ul>
        </div>

        <!--轮播图的搜索框-->
        <div class="span7 text-right">
            <form name="searchform" th:action="@{/index/toSearch}">
                <div class="input-group padding-small-top">
                    <input type="text" class="wd input border-main" name="name" value="" autocomplete="off" size="30"   required="required" placeholder="搜索海量图书/电子书/网络小说">
                    <span class="addbtn"><button class="button bg-main"><span class="icon-search"></span></button></span>
                </div>
            </form>
        </div>
    </div>
    </div>
</div>


<!--首页  top-->
<div class="container">
    <div class="row">
        <div class="span8"><a href="javascript:;"  title="爱读书"><img th:src="@{/picture/login2.png}"
                                                                                     alt="爱读书"></a></div>
        <!--搜索框，通过form表单实现 -->
        <div class="span10 padding-big-top">
            <form name="searchform" th:action="@{/index/toSearch}">
                <div class="input-group padding-little-top margin-big-right">
                    <input type="text" name="name" class="wd input input-big border-main" value="" size="30"
                           required="required" placeholder="搜索海量图书">
                    <span class="addbtn"><button class="button button-big bg-main" id="search_button"><span
                            class="icon-search text-large"></span></button></span>
                </div>
            </form>
        </div>

        <!--实现我的账户和书架-->
        <div class="span6 padding-large-top text-right">
            <div class="button-group" th:if="${session.user} !=null">
                <button type="button" class="button text-main"><span class="icon-user"></span> <a th:href="@{/index/toAccount/}+${session.user.phone}">我的账户</a></button>
                <button type="button" class="button text-main"><span class="icon-shujia"></span><a th:href="@{/index/toBookshelf/}+${session.user.id}">我的书架</a> </button>
            </div>
            <div class="button-group" th:if="${session.user} ==null">
                <button type="button" class="button text-main"><span class="icon-user"></span> <a href="javascript:;">我的账户</a></button>
                <button type="button" class="button text-main"><span class="icon-shujia"></span><a href="javascript:;">我的书架</a> </button>
            </div>
        </div>

    </div>
</div>

<!--正文-->
<div class="container">
    <div class="row margin-top">
        <div class="span24">
            <ul class="nav nav-menu nav-inline nav-sub nav-big nav-navicon nav-justified border-dot">
                <li id="ctl00_c1_nav_meiwen"><a  th:href="@{/index/toRead}">每日一读</a></li>
                <li id="ctl00_c1_nav_lianzai" class="active"><a  href="javascript:;" >在线读书</a></li>
                <li id="ctl00_c1_nav_daohang"><a th:href="@{/index/nev}">读书导航</a></li>
            </ul>
        </div>
    </div>
</div>



<div class="container margin-large-top">
    <div class="row"><div class="span5">

        <!--分类导航-->
        <div class="sub-catalog margin-big-bottom">
            <dl><dt><a th:href="@{/index/toNovel/1}"><span class="icon-du padding-right"></span>小说作品</a></dt></dl>
            <dl><dt><a th:href="@{/index/toNovel/2}"><span class="icon-du padding-right"></span>经济管理</a></dt></dl>
            <dl><dt><a th:href="@{/index/toNovel/3}"><span class="icon-du padding-right"></span>历史传记</a></dt></dl>
            <dl><dt><a th:href="@{/index/toNovel/4}"><span class="icon-du padding-right"></span>生活时尚</a></dt></dl>
            <dl><dt><a th:href="@{/index/toNovel/5}"><span class="icon-du padding-right"></span>文学艺术</a></dt></dl>
            <dl><dt><a th:href="@{/index/toNovel/6}"><span class="icon-du padding-right"></span>社会科学</a></dt></dl>
            <dl><dt><a th:href="@{/index/toNovel/7}"><span class="icon-du padding-right"></span>成功励志</a></dt></dl>
        </div>


        <div class="tit"><h3>读书排行榜</h3></div>
        <div id="J_commend" class="books-left border">
            <tbody>
            <ul>
                <li th:each="book,iterStat:${rankBooks}">
                    <p style="display: none;" class="fold">
                        <a th:href="@{/index/toBookInfo/}+${book.id}" th:title="${book.title}" target="_blank" th:text="${book.title}"><i th:text="${iterStat.count}"></i></a></p>
                    <div class="unfold" style="display: block;">
                        <i th:text="${iterStat.count}"></i>
                        <div>
                            <div class="img80"><a th:href="@{/index/toBookInfo/}+${book.id}" th:title="${book.title}" target="_blank"><img th:alt="${book.title}" th:src="'/index/toHtml?Url='+${book.image}"></a></div>
                            <h3><a th:href="@{/index/toBookInfo/}+${book.id}" th:title="${book.title}" target="_blank" th:text="${book.title}"></a></h3>
                            <p></p>
                        </div>
                    </div>
                </li>
            </ul>
            </tbody>
        </div>
    </div>

        <div class="span19 padding-left">
            <div><img th:src="@{/picture/yuedu.jpg}" alt="全民阅读，书香中国"></div>
            <div class="tit margin-big-top"><h3>最近更新</h3></div>
            <div class="bookslist">
                <ul>
                    <li class="top" th:each="book:${books}">
                        <div class="book-info">
                            <div class="img152 float-left margin-right"><a th:href="@{/index/toBookInfo/}+${book.id}" ><img th:alt="${book.title}" th:src="'/index/toHtml?Url='+${book.image}"></a></div>
                            <h3><a th:href="@{/index/toBookInfo/}+${book.id}"  th:title="${book.title}"  th:text="${book.title}"></a></h3>
                            <p th:text="${book.author}"></p>
                            <p class="disc eps" th:text="${#strings.abbreviate(book.book_introduction,40)}"></p>
                        </div>
                    </li>
                </ul>
            </div>
        </div>

    </div>
</div>

<div class="layout" id="footer">
    <div class="container padding">
        <div class="text-center">
            <ul class="nav nav-inline">
                <li><a href="1587.html">关于读书</a> </li>
                <li><a href="1588.html">免责声明</a> </li>
                <li><a href="1589.html">读书目录</a> </li>
                <li><a href="1590.html">联系我们</a> </li>
            </ul>
        </div>
        <div class="text-center height-big">Copyright © 读书网 www.dushu.com 2005-2020, All Rights Reserved.</div>
        <div class="text-center height-big"><a href="javascript:;">鄂ICP备15019699号</a> <img th:src="@{/picture/beian.png}" style="vertical-align:middle;margin-left:10px;"> 鄂公网安备 42010302001612号</div>
    </div>
</div>

<script>
    layui.use(["jquery", "layer", 'rate', "form", "element"], function () {
        var $ = layui.$;
        var layer = layui.layer;
        var form = layui.form;
        var rate = layui.rate;

        $("#but-login").click(function () {
            layer.open({
                title: false,
                type: 2,
                content: ['/index/toLogin','no'],
                offset: 'auto',
                area: ['40%', '75%'],
                success: function (data) {
                }
            });
            form.render();
        });
    });
</script>
<script lang="javascript" type="text/javascript" th:src="@{/js/common.min-201706.js}"></script>
</body>
</html>
